<?php
namespace ImiDemo\HttpDemo\MainServer\Model;

use Imi\Model\Model;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * Comment
 * @Entity
 * @Table(name="tb_comment", id={"id"})
 * @property int $id
 * @property string $content
 * @property int $type
 * @property int $relationId
 */
class Comment extends Model
{
	/**
	 * id
	 * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
	 * @var int
	 */
	protected $id;

	/**
	 * 获取 id
	 *
	 * @return int
	 */ 
	public function getId()
	{
		return $this->id;
	}

	/**
	 * 赋值 id
	 * @param int $id id
	 * @return static
	 */ 
	public function setId($id)
	{
		$this->id = $id;
		return $this;
	}

	/**
	 * content
	 * @Column(name="content", type="text", length=0, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
	 * @var string
	 */
	protected $content;

	/**
	 * 获取 content
	 *
	 * @return string
	 */ 
	public function getContent()
	{
		return $this->content;
	}

	/**
	 * 赋值 content
	 * @param string $content content
	 * @return static
	 */ 
	public function setContent($content)
	{
		$this->content = $content;
		return $this;
	}

	/**
	 * type
	 * @Column(name="type", type="tinyint", length=4, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
	 * @var int
	 */
	protected $type;

	/**
	 * 获取 type
	 *
	 * @return int
	 */ 
	public function getType()
	{
		return $this->type;
	}

	/**
	 * 赋值 type
	 * @param int $type type
	 * @return static
	 */ 
	public function setType($type)
	{
		$this->type = $type;
		return $this;
	}

	/**
	 * relation_id
	 * @Column(name="relation_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
	 * @var int
	 */
	protected $relationId;

	/**
	 * 获取 relationId
	 *
	 * @return int
	 */ 
	public function getRelationId()
	{
		return $this->relationId;
	}

	/**
	 * 赋值 relationId
	 * @param int $relationId relation_id
	 * @return static
	 */ 
	public function setRelationId($relationId)
	{
		$this->relationId = $relationId;
		return $this;
	}

}